package org.lex.splitter.ui.awt;

import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.Label;
import java.awt.Panel;
import java.awt.TextField;

public class InputPane extends Panel {
	private static final long serialVersionUID = 6880096119212851002L;

	private Label label = null;
	private TextField textField = null;
	private Button button = null;

	public InputPane() {
		this.initialize();
	}

	public Label getLabel() {
		if (null == label) {
			label = new Label();
		}
		return label;
	}

	public TextField getTextField() {
		if (null == textField) {
			textField = new TextField();
		}
		return textField;
	}

	public Button getButton() {
		if (null == button) {
			button = new Button();
		}
		return button;
	}

	private void initialize() {
		BorderLayout layout = new BorderLayout();
		layout.setHgap(5);
		this.setLayout(layout);

		this.add(this.getLabel(), BorderLayout.WEST);
		this.add(this.getTextField(), BorderLayout.CENTER);
		this.add(this.getButton(), BorderLayout.EAST);
	}
}
